#!/bin/csh -f

# Set the parameters to the beast script in the line below:

set BeastCmd="beast --serial"
#set BeastCmd="beast --sgeqsub=dea --nodes=2"

#############################################################
#------ Changes below this line should not be needed     ----

if("a$1" == "a") then
echo This script is used by TLM manager to start beast simulations
echo It should result in a call to the beast script with
echo any parameters that you like on the input file $1.in
exit 1
endif

echo Starting a Beast simulation with input file: $1.in
echo Make sure that: 
echo time = $2
echo timeEnd = $3
echo MaxTimeStep "<"= $4
echo Writing server name $5 to file $1.tlm
echo $5 > $1.tlm


echo Starting beast

$BeastCmd $1.in
